package com.qy.StudentInfo.service.impl;

import com.qy.StudentInfo.mapper.CoursePlanMapper;
import com.qy.StudentInfo.mapper.SelectCourseMapper;
import com.qy.StudentInfo.pojo.CourseGrade;
import com.qy.StudentInfo.pojo.Student;
import com.qy.StudentInfo.pojo.SysLog;
import com.qy.StudentInfo.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @program: student-info-master
 * @author: QiYue
 * @create: 20220429 23:13
 **/
@Service
public class SysLogServiceImpl implements SysLogService {
    @Autowired
    private SelectCourseMapper selectCourseMapper;
    @Autowired
    private CoursePlanMapper coursePlanMapper;
    @Override
    public List<SysLog> serviceAllList(SysLog sreq) {
        HashMap<String,Object> hashMap = new HashMap<>();
        hashMap.put("cid",sreq.getCid());
        List<SysLog> byStuSid = selectCourseMapper.getAllByStuSid(hashMap);
        return byStuSid;
    }

    /**
     * 根据cid 查询课程结课名单
     * @param sreq
     * @return
     */
    @Override
    public List<SysLog> selectAllScore(SysLog sreq) {
        HashMap<String,Object> hashMap = new HashMap<>();
        hashMap.put("cid",sreq.getCid());
        List<SysLog> selectScore = coursePlanMapper.selectAllScore(hashMap);
        return selectScore;
    }
}
